#ifndef XXT_BUS_DATA_HPP
#define XXT_BUS_DATA_HPP

#include <functional>
#include <content/bindable.hpp>
#include <vector>
#include <content/basic_provider.hpp>
#include "content/image.hpp"

struct bus_info {
    std::string name;
    int         routeId;
    int         routeStationId;
    int         direction;
};

class XxtBusData : public bindable_base {
public:
    std::optional<std::tuple<value_type, std::any>> get_data(const std::string &key) override;

    XxtBusData();

    int selected;

    basic_data<int>       count;
    bool                  on_off{false};
    int                   slider_val{50};
    std::string           tooltip;
    std::vector<bus_info> infos;

    ImageContent* images[4];
    ImageContent* icon;

    std::function<ImageContent* (int icon_id)> get_icon;

private:
    void Hello_CMD();
};

#endif // XXT_BUS_DATA_HPP
